home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / var / db / pkg / sys-devel / gcc-config-1.3.13-r2 / gcc-config-1.3.13-r2.ebuild < prev    next >
Encoding:
Text File  |  2006-05-08  |  1.4 KB  |  52 lines

  1. # Copyright 1999-2006 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.3.13-r2.ebuild,v 1.1 2006/04/25 00:20:17 vapier Exp $
  4.  
  5. inherit toolchain-funcs multilib
  6.  
  7. # Version of .c wrapper to use
  8. W_VER="1.4.7"
  9.  
  10. DESCRIPTION="Utility to change the gcc compiler being used"
  11. HOMEPAGE="http://www.gentoo.org/"
  12. SRC_URI=""
  13.  
  14. LICENSE="GPL-2"
  15. SLOT="0"
  16. KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
  17. IUSE=""
  18.  
  19. DEPEND=""
  20.  
  21. S=${WORKDIR}
  22.  
  23. src_compile() {
  24.     $(tc-getCC) -O2 -Wall -o wrapper \
  25.         "${FILESDIR}"/wrapper-${W_VER}.c || die "compile wrapper"
  26. }
  27.  
  28. src_install() {
  29.     newbin "${FILESDIR}"/${PN}-${PV} ${PN} || die "install gcc-config"
  30.     sed -i \
  31.         -e "s:PORTAGE-VERSION:${PVR}:g" \
  32.         -e "s:GENTOO_LIBDIR:$(get_libdir):g" \
  33.         "${D}"/usr/bin/${PN}
  34.  
  35.     exeinto /usr/$(get_libdir)/misc
  36.     newexe wrapper gcc-config || die "install wrapper"
  37. }
  38.  
  39. pkg_postinst() {
  40.     # Do we have a valid multi ver setup ?
  41.     if gcc-config --get-current-profile &>/dev/null ; then
  42.         # We not longer use the /usr/include/g++-v3 hacks, as
  43.         # it is not needed ...
  44.         [[ -L ${ROOT}/usr/include/g++ ]] && rm -f "${ROOT}"/usr/include/g++
  45.         [[ -L ${ROOT}/usr/include/g++-v3 ]] && rm -f "${ROOT}"/usr/include/g++-v3
  46.         [[ ${ROOT} = "/" ]] && gcc-config $(/usr/bin/gcc-config --get-current-profile)
  47.     fi
  48.  
  49.     # Make sure old versions dont exist #79062
  50.     rm -f "${ROOT}"/usr/sbin/gcc-config
  51. }
  52.